<template>
	<div class="ask-wrap">
		<c_header title="智问" :leftOptions="{showBack: false}" :rightOptions="{showMore: true}"></c_header>
		<div class="ask">
			<input type="text" v-model="question" /> <input type="button" value="发送" @click="ask"/>
			<p>{{answer}}</p>
		</div>
		<c_sidemenu></c_sidemenu>
	</div>
</template>

<script>
import c_header from '@/components/c_header'
import c_sidemenu from '@/components/c_sidemenu'	

export default {
	name: 'hotnews',
	data () {
		return {
			question: '',
			answer: ''
		}
	},
	components: {
		c_header,
  		c_sidemenu,
	},
	methods: {
		ask () {
			this.$getData.ask({question: this.question}, (response) => {
				this.answer = response.data.result.content
			})
		}
	}
}
</script>

<style>
	.ask{text-align: center;padding: 50px 0;}
</style>